package com.kust.cmsService.controller;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.kust.cmsService.entity.CrmBanner;
import com.kust.cmsService.service.CrmBannerService;
import com.kust.commomUtils.Result;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * 首页banner表 前端控制器
 * </p>
 *
 * @author testjava
 * @since 2022-06-29
 */
@RestController
@RequestMapping("/cmsService/bannerFront")
public class BannerFrontController {

    @Autowired
    private CrmBannerService bannerService;


    @ApiOperation(value = "获取首页banner")
    @GetMapping("getAllBanner")
    public Result index() {
        List<CrmBanner> list = bannerService.selectAllBanner();
        return Result.ok().data("bannerList", list);
    }

}

